﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.IO;
using Quartz.Net.Model;

namespace Quartz.Net.JobTest
{
    class Program
    {
        static void Main(string[] args)
        {
            ////ConsoleHelper.hideConsole();
            //core.JobTest j = new core.JobTest();
            //j.Excutn();

            //string s = RunStatus.Suspend.ToString();

           Quartz.Net.Utils.Logs.Fatal("11", "22");
           Quartz.Net.Utils.Logs.Error("11", "22");
           Quartz.Net.Utils.Logs.Warn("11", "22");
           Quartz.Net.Utils.Logs.Info("11", "22");
           Quartz.Net.Utils.Logs.Debug("11", "22");
            

            Console.WriteLine("成功");
            Console.ReadKey();
             
            #region 创建XML
            //// (1)创建xml文档对象
            //XmlDocument doc = new XmlDocument();

            //if (File.Exists("Books.xml"))
            //{
            //    File.Delete("Books.xml");
            //}

            //// (2)创建描述信息（第1行）
            //XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "utf-8", null);
            //doc.AppendChild(dec);

            //// (3)创建根节点(Books)
            //XmlElement books = doc.CreateElement("Books");
            //doc.AppendChild(books);
            //// (4)给根节点Books创建第1个子节点
            //XmlElement book1 = doc.CreateElement("Book");
            //book1.SetAttribute("JobId", "1");
            //book1.SetAttribute("Stype", "1");
            //books.AppendChild(book1);
            //XmlElement name1 = doc.CreateElement("Name");
            //name1.InnerText = "红楼梦";
            //book1.AppendChild(name1);

            //XmlElement writer1 = doc.CreateElement("Writer");
            //writer1.InnerXml = "曹雪芹";
            //book1.AppendChild(writer1);

            //XmlElement price1 = doc.CreateElement("Price");
            //price1.InnerText = "25";
            //book1.AppendChild(price1);

            //// (5)给根节点Books创建第2个子节点
            //XmlElement book2 = doc.CreateElement("Book");
            //book2.SetAttribute("JobId", "2");
            //book2.SetAttribute("Stype", "2");
            //books.AppendChild(book2);

            //XmlElement name2 = doc.CreateElement("Name");
            //name2.InnerText = "西游记";
            //book2.AppendChild(name2);

            //XmlElement writer2 = doc.CreateElement("Writer");
            //writer2.InnerXml = "吴承恩";
            //book2.AppendChild(writer2);

            //XmlElement price2 = doc.CreateElement("Price");
            //price2.InnerText = "20";
            //book2.AppendChild(price2);
            //// (5)保存到doc文档中
            //doc.Save("Books.xml");
            #endregion


            #region 获取XML
            //XmlDocument doc = new XmlDocument();
            ////doc.Load("http://192.168.3.34/goffice3.0new/GWSY/Books.xml");
            //doc.Load("Books.xml");
            //XmlNodeList xnl = doc.SelectNodes("/Books/Book");
            //foreach (XmlNode node in xnl)
            //{
            //   string Name = node.SelectSingleNode("Name").InnerText;

            //   node.SelectSingleNode("Name").InnerText = Name+"1";
            //    Console.WriteLine(node.Attributes["JobId"].Value + "+" + node.Attributes["Stype"].Value);
            //    node.Attributes["JobId"].Value = "55";
            //}

            //doc.Save("Books.xml");
            #endregion

            //Console.WriteLine("创建成功");
            //Console.ReadKey();

        }

        
    }
}
